import Vue from "vue";
import VueRouter from "vue-router";
import 与2x版本生命周期相对应的组合式API from "../views/1_与2x版本生命周期相对应的组合式 API.vue";
import 响应式实现 from "../views/2_响应式实现.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "与2x版本生命周期相对应的组合式API",
    component: 与2x版本生命周期相对应的组合式API,
  },

  {
    path: "/响应式实现",
    name: "响应式实现",
    component: 响应式实现,
  },
  {
    path: "/about",
    name: "About",
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () =>
      import(/* webpackChunkName: "about" */ "../views/About.vue"),
  },
];

const router = new VueRouter({
  routes,
});

export default router;
